//
//  MMTableView.h
//  EraPig
//
//  Created by Mac_Mini on 2021/2/24.
//

#import <UIKit/UIKit.h>
#import <MJRefresh/MJRefresh.h>
#import "UITableView+MMAdd.h"
NS_ASSUME_NONNULL_BEGIN

typedef void(^MMTBRefreshBlock)(void);
typedef void(^MMTBRefreshBlock)(void);
@interface MMTableView : UITableView

/// 初始化TableView
/// @param frame frame
/// @param style 样式
/// @param dataSource 数据源
/// @param delegate 代理
- (instancetype)initWithFrame:(CGRect)frame
                        style:(UITableViewStyle)style
                   dataSource:(id)dataSource
                     delegate:(id)delegate;

/// 初始化TableView
/// @param frame frame
/// @param style 样式
/// @param dataSource 数据源
/// @param delegate 代理
/// @param separatorColor 分割线颜色
- (instancetype)initWithFrame:(CGRect)frame
                        style:(UITableViewStyle)style
                   dataSource:(id)dataSource
                     delegate:(id)delegate
               separatorColor:(nullable UIColor *)separatorColor;

- (void)addPullRefresh:(MMTBRefreshBlock)pullRefreshBlock;
- (void)addLoadRefresh:(MMTBRefreshBlock)loadRefreshBlock;
- (void)endRefresh;
- (void)setShowsLoadMoreScrolling:(BOOL)show;//是否显示加载更多

- (void)setNotDataView:(UIView *)defaultView;

/// 加载更多是否隐藏
@property (nonatomic, assign) BOOL footerRefresHiddenState;

@end

NS_ASSUME_NONNULL_END
